package com.ruoyi.common.enums;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * 赵项阳
 *
 * @author DELL
 * @date 2022/6/7 9:17
 */
@Getter
public enum IssueEnum {

    EXAM("1","赶考精神"),

    LSZY("2","辽沈战役"),

    EIGHTHROUTEARMY("3","八路军一二九师"),

    THEMEETING("4","七届二中全会");

    private final String code;

    private final String message;

    IssueEnum(String code,String message){
        this.code=code;
        this.message=message;
    }

    public static String getName(String code){
        String message="未匹配到具体字段";
       if (StringUtils.isNotEmpty(code)){
           for (IssueEnum issueEnum:IssueEnum.values()){
                 if (issueEnum.code.equals(code)){
                     return issueEnum.message;
                 }
           }
       }
       return message;
    }


}
